package com.rose;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class GetProperties
{
	private Properties userList;
	private Properties loadUser() throws IOException
	{
		if(null == userList)
		{
			File f = new File("userFile.properties");
			if(!f.exists())
			{
				f.createNewFile();
			}
			userList = new Properties();
			userList.load(new FileInputStream(f));
		}
		return userList;
	}
	
	private boolean saveUserList() throws IOException
	{
		if(null == userList)
		{
			return false;
		}
		userList.store(new FileOutputStream("userFile.properties"), "userList");
		return true;
	}
}
